from django.db import models

# Create your models here.
from django.db import models

class Department(models.Model):
    """系部"""
    name = models.CharField(max_length=100, unique=True, verbose_name='系部名称')
    chairman = models.CharField(max_length=100, blank=True, verbose_name='系主任')
    office = models.CharField(max_length=100, blank=True, verbose_name='办公室')
    created_at = models.DateTimeField(auto_now_add=True, verbose_name='创建时间')

    class Meta:
        db_table = 'tb_department'
        verbose_name = '系部'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.name